<% title_tag t(".Settings"), @repository.name %>


<%= render "menu" %>
<div class="col-12 col-md-9 float-left">
  <%= render "repository_settings/exports/pdf", repository: @repository %>

  <%= render "repository_settings/exports/archive", repository: @repository %>

  <%= form_for(@repository, url: docs_user_repository_settings_path(@user, @repository), method: :post) do |f| %>
    <div class="box transfer-docs">
      <h1 class="title mb-3">
        <div class="content"><%= t(".Transfer docs to other repository") %></div>
        <div class="text-gray f5">
          <%= t(".Choise doc in list, you can move them into the other repository") %>
        </div>
      </h1>
      <ul class="docs-list mb-3">
        <% @repository.docs.each do |doc| %>
        <li class="box-row">
          <label for="doc-<%= doc.id %>-checkbox" style="font-weight: normal;" class="display-block clearfix">
            <input id="doc-<%= doc.id %>-checkbox" type="checkbox" class="form-checkbox float-left mr-3 checkbox-radius" name="transfer[doc_id][]" value="<%= doc.id %>" />
            <div class="title"><%= doc.title %></div>
            <div class="slug text-gray-light"><%= doc.slug %></div>
          </label>
        </li>
        <% end %>
      </ul>
      <div class="box-select mb-4">
        <%= render "/shared/user_repositories_select_menu", input_name: "transfer[repository_id]", value: params.dig(:transfer, :repository_id) %>
      </div>
      <div class="text-gray mb-3"><%= icon_tag("warn") %> <%= t(".If a file already exists with that name in the destination repository, the doc path will be changed into a random string") %></div>
      <button type="submit" class="btn btn-danger btn-submit"><%= t(".Transfer now") %></button>
    </div>
  <% end %>
</div>